package com.twu.biblioteca;

public class LoginState implements State {

    BibliotecaApp biblio;

    private String username = "";
    private String password = "";


    public static LoginState instance = new LoginState();

    private LoginState() {

    }

    public void setBibliotecaApp(BibliotecaApp newBiblioteca) {
        this.biblio = newBiblioteca;
    }


    public String getMessage() {
        return null;  //To change body of implemented methods use File | Settings | File Templates.
    }


    public String getMenuOption() {
        return "Log In";  //To change body of implemented methods use File | Settings | File Templates.
    }


    public State change(String input) {
        if (username.isEmpty()) {
            username = input;
            return LoginState.instance;
        } else if (password.isEmpty()) {
            password = input;
            return MenuState.instance;
        }
        return null;

    }
}
